package slu.appli.command.impl;

import java.util.Hashtable;
import java.util.Map;

import slu.appli.command.CommandInterface;

public class BasicCommand 
implements CommandInterface {
	private final String commandName;
	private Map<String,Object> datas;

	public BasicCommand(String commandName) {
		super();
		this.commandName = commandName;
	}

	@Override
	public String getCommandName() {
		return this.commandName;
	}

	@Override
	public void putData(String name, Object value) {
		if (this.datas == null) this.datas = new Hashtable<String, Object>();
		this.datas.put(name, value);
	}

	@Override
	public Object getData(String name) {
		if (this.datas == null) return null;
		return this.datas.get(name);
	}

	@Override
	public void run() {
	}

}
